let matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3
let nums = []

matrix.forEach((item) => {
    nums.push(...item)
})

let left = 0
let right = nums.length - 1
let mid = 0
while(left <= right){
    mid = Math.floor((left + right) / 2)
    if(nums[mid] == target){
        return true
    }else if(nums[mid] < target){
        left = mid + 1
    }else{
        right = mid - 1
    }
}
return false